package ssmDemo.service;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import ssmDemo.bean.Student;
import ssmDemo.dao.StudentDao;

@Service
public class StudentService {

	@Autowired
	private StudentDao studentDao;

	@Transactional(rollbackFor = Exception.class)
	public void addStudent(Student student) {
		studentDao.addStudent(student);
//		int a = 1/0;
	}
	
}
